package com.cms.archives

import org.grails.taggable.*

/**
 * 
 * @author novthir
 *
 */
class CmsArticle {
	static hasMany = [category:CmsCategory,comment:CmsComment]
	String title
	String content
	String summary
	Date createdOn
	Date changedOn
	static constraints = {
		content(blank:false)
		title(maxSize:1000,blank:false)
		summary(maxSize:2000)
	}

	/**
	 */
	def beforeInsert = { createdOn = new Date() }

	def beforeUpdate = { changedOn =new Date() }
	//String su // hK7ez3Wn3eP5
}
